package org.user.service;

import org.user.dao.UserDao;
import org.user.entity.User;

public class LoginService {
    public boolean checkUser(User user) {
        //在这里调用dao方法
        UserDao dao = new UserDao();
        //把名字传入对象中查询
        User result = dao.findUserByName(user.getName());
        System.out.println(result);
        return result != null && user.getPass().equals(result.getPass()) ? true : false;
        
    
        /*if(user != null){
            if(password.equals(user.getUserPass())){
                return true;
            }
        }
        return false;*/
    }

}